<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>hashcat-3.201: H:/TDDownload/Hashcat v3.20/hashcat-3.201/src/logfile.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">hashcat-3.201
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_06fe396e3e859736df6d43ad26baa72e.html">hashcat-3.201</a></li><li class="navelem"><a class="el" href="dir_9ce3dfc5d638c7f8b2c4ec0f6627771b.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">logfile.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;common.h&quot;</code><br />
<code>#include &quot;types.h&quot;</code><br />
<code>#include &quot;memory.h&quot;</code><br />
<code>#include &quot;event.h&quot;</code><br />
<code>#include &quot;logfile.h&quot;</code><br />
<code>#include &quot;locking.h&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for logfile.c:</div>
<div class="dyncontent">
<div class="center"><img src="logfile_8c__incl.gif" border="0" usemap="#_h_1_2_t_d_download_2_hashcat_01v3_820_2hashcat-3_8201_2src_2logfile_8c" alt=""/></div>
<map name="_h_1_2_t_d_download_2_hashcat_01v3_820_2hashcat-3_8201_2src_2logfile_8c" id="_h_1_2_t_d_download_2_hashcat_01v3_820_2hashcat-3_8201_2src_2logfile_8c">
<area shape="rect"  title=" " alt="" coords="209,5,372,61"/>
<area shape="rect"  title=" " alt="" coords="5,109,88,136"/>
<area shape="rect"  title=" " alt="" coords="113,109,178,136"/>
<area shape="rect"  title=" " alt="" coords="203,109,283,136"/>
<area shape="rect"  title=" " alt="" coords="307,109,370,136"/>
<area shape="rect"  title=" " alt="" coords="395,109,461,136"/>
<area shape="rect"  title=" " alt="" coords="485,109,560,136"/>
</map>
</div>
</div>
<p><a href="logfile_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:accf59abaaeabe6847e709963497151af"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="logfile_8c.html#accf59abaaeabe6847e709963497151af">logfile_generate_id</a> (void)</td></tr>
<tr class="separator:accf59abaaeabe6847e709963497151af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a24119994ed9731194ddbf45fccecc8be"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="logfile_8c.html#a24119994ed9731194ddbf45fccecc8be">logfile_generate_topid</a> (hashcat_ctx_t *hashcat_ctx)</td></tr>
<tr class="separator:a24119994ed9731194ddbf45fccecc8be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad43a6618e35a5e81e5801deb6b648d15"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="logfile_8c.html#ad43a6618e35a5e81e5801deb6b648d15">logfile_generate_subid</a> (hashcat_ctx_t *hashcat_ctx)</td></tr>
<tr class="separator:ad43a6618e35a5e81e5801deb6b648d15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a860518f14628333d31b97332227443"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="logfile_8c.html#a3a860518f14628333d31b97332227443">logfile_append</a> (hashcat_ctx_t *hashcat_ctx, const char *fmt,...)</td></tr>
<tr class="separator:a3a860518f14628333d31b97332227443"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f19671b53c417b49b3d066631596495"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="logfile_8c.html#a4f19671b53c417b49b3d066631596495">logfile_init</a> (hashcat_ctx_t *hashcat_ctx)</td></tr>
<tr class="separator:a4f19671b53c417b49b3d066631596495"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00c88f836bc7aba5dfea6111ca82cbf0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="logfile_8c.html#a00c88f836bc7aba5dfea6111ca82cbf0">logfile_destroy</a> (hashcat_ctx_t *hashcat_ctx)</td></tr>
<tr class="separator:a00c88f836bc7aba5dfea6111ca82cbf0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="a3a860518f14628333d31b97332227443"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3a860518f14628333d31b97332227443">&#9670;&nbsp;</a></span>logfile_append()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void logfile_append </td>
          <td>(</td>
          <td class="paramtype">hashcat_ctx_t *&#160;</td>
          <td class="paramname"><em>hashcat_ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>fmt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="logfile_8c_source.html#l00046">46</a> of file <a class="el" href="logfile_8c_source.html">logfile.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;{</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;  logfile_ctx_t *logfile_ctx = hashcat_ctx-&gt;logfile_ctx;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;  <span class="keywordflow">if</span> (logfile_ctx-&gt;enabled == <span class="keyword">false</span>) <span class="keywordflow">return</span>;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;  FILE *fp = fopen (logfile_ctx-&gt;logfile, <span class="stringliteral">&quot;ab&quot;</span>);</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;  <span class="keywordflow">if</span> (fp == NULL)</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;  {</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    <a class="code" href="event_8c.html#ab419d8d7e9b12e78980ed9f17bdd5ed5">event_log_error</a> (hashcat_ctx, <span class="stringliteral">&quot;%s: %s&quot;</span>, logfile_ctx-&gt;logfile, strerror (errno));</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    <span class="keywordflow">return</span>;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;  }</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;  <a class="code" href="locking_8c.html#a29a00825c15274df14db9bf40c016d65">lock_file</a> (fp);</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;  va_list ap;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;  va_start (ap, fmt);</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;  vfprintf (fp, fmt, ap);</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;  va_end (ap);</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;  fwrite (EOL, strlen (EOL), 1, fp);</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;  fflush (fp);</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;  fclose (fp);</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;}</div><div class="ttc" id="locking_8c_html_a29a00825c15274df14db9bf40c016d65"><div class="ttname"><a href="locking_8c.html#a29a00825c15274df14db9bf40c016d65">lock_file</a></div><div class="ttdeci">int lock_file(MAYBE_UNUSED FILE *fp)</div><div class="ttdef"><b>Definition:</b> <a href="locking_8c_source.html#l00043">locking.c:43</a></div></div>
<div class="ttc" id="event_8c_html_ab419d8d7e9b12e78980ed9f17bdd5ed5"><div class="ttname"><a href="event_8c.html#ab419d8d7e9b12e78980ed9f17bdd5ed5">event_log_error</a></div><div class="ttdeci">size_t event_log_error(hashcat_ctx_t *hashcat_ctx, const char *fmt,...)</div><div class="ttdef"><b>Definition:</b> <a href="event_8c_source.html#l00168">event.c:168</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="event_8c_source.html#l00168">event_log_error()</a>, and <a class="el" href="locking_8c_source.html#l00043">lock_file()</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="logfile_8c_a3a860518f14628333d31b97332227443_cgraph.gif" border="0" usemap="#logfile_8c_a3a860518f14628333d31b97332227443_cgraph" alt=""/></div>
<map name="logfile_8c_a3a860518f14628333d31b97332227443_cgraph" id="logfile_8c_a3a860518f14628333d31b97332227443_cgraph">
<area shape="rect"  title=" " alt="" coords="5,56,109,83"/>
<area shape="rect"  href="event_8c.html#ab419d8d7e9b12e78980ed9f17bdd5ed5" title=" " alt="" coords="157,31,267,57"/>
<area shape="rect"  href="locking_8c.html#a29a00825c15274df14db9bf40c016d65" title=" " alt="" coords="177,81,247,108"/>
<area shape="rect"  href="event_8c.html#a6221c6caa1d2069ad1c3103f0b013ef7" title=" " alt="" coords="315,5,393,32"/>
<area shape="rect"  href="event_8c.html#ad5a30ac9dc4301540e19643500eb78e4" title=" " alt="" coords="316,56,392,83"/>
</map>
</div>

</div>
</div>
<a id="a00c88f836bc7aba5dfea6111ca82cbf0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a00c88f836bc7aba5dfea6111ca82cbf0">&#9670;&nbsp;</a></span>logfile_destroy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void logfile_destroy </td>
          <td>(</td>
          <td class="paramtype">hashcat_ctx_t *&#160;</td>
          <td class="paramname"><em>hashcat_ctx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="logfile_8c_source.html#l00109">109</a> of file <a class="el" href="logfile_8c_source.html">logfile.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;{</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;  logfile_ctx_t *logfile_ctx = hashcat_ctx-&gt;logfile_ctx;</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;  <span class="keywordflow">if</span> (logfile_ctx-&gt;enabled == <span class="keyword">false</span>) <span class="keywordflow">return</span>;</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;  <a class="code" href="memory_8c.html#ad8ba3dcf1734b1d2c8679600f0f0c3c9">hcfree</a> (logfile_ctx-&gt;logfile);</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;  <a class="code" href="memory_8c.html#ad8ba3dcf1734b1d2c8679600f0f0c3c9">hcfree</a> (logfile_ctx-&gt;topid);</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;  <a class="code" href="memory_8c.html#ad8ba3dcf1734b1d2c8679600f0f0c3c9">hcfree</a> (logfile_ctx-&gt;subid);</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;  memset (logfile_ctx, 0, <span class="keyword">sizeof</span> (logfile_ctx_t));</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;}</div><div class="ttc" id="memory_8c_html_ad8ba3dcf1734b1d2c8679600f0f0c3c9"><div class="ttname"><a href="memory_8c.html#ad8ba3dcf1734b1d2c8679600f0f0c3c9">hcfree</a></div><div class="ttdeci">void hcfree(void *ptr)</div><div class="ttdef"><b>Definition:</b> <a href="memory_8c_source.html#l00071">memory.c:71</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="memory_8c_source.html#l00071">hcfree()</a>.</p>

<p class="reference">Referenced by <a class="el" href="hashcat_8c_source.html#l01134">hashcat_session_destroy()</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="logfile_8c_a00c88f836bc7aba5dfea6111ca82cbf0_cgraph.gif" border="0" usemap="#logfile_8c_a00c88f836bc7aba5dfea6111ca82cbf0_cgraph" alt=""/></div>
<map name="logfile_8c_a00c88f836bc7aba5dfea6111ca82cbf0_cgraph" id="logfile_8c_a00c88f836bc7aba5dfea6111ca82cbf0_cgraph">
<area shape="rect"  title=" " alt="" coords="5,5,111,32"/>
<area shape="rect"  href="memory_8c.html#ad8ba3dcf1734b1d2c8679600f0f0c3c9" title=" " alt="" coords="159,5,216,32"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="logfile_8c_a00c88f836bc7aba5dfea6111ca82cbf0_icgraph.gif" border="0" usemap="#logfile_8c_a00c88f836bc7aba5dfea6111ca82cbf0_icgraph" alt=""/></div>
<map name="logfile_8c_a00c88f836bc7aba5dfea6111ca82cbf0_icgraph" id="logfile_8c_a00c88f836bc7aba5dfea6111ca82cbf0_icgraph">
<area shape="rect"  title=" " alt="" coords="323,5,428,32"/>
<area shape="rect"  href="hashcat_8c.html#aac7de5dfb85c0aa9bccebf9782855ffa" title=" " alt="" coords="104,5,275,32"/>
<area shape="rect"  href="main_8c.html#a3c04138a5bfe5d72780bb7e82a18e627" title=" " alt="" coords="5,5,56,32"/>
</map>
</div>

</div>
</div>
<a id="accf59abaaeabe6847e709963497151af"></a>
<h2 class="memtitle"><span class="permalink"><a href="#accf59abaaeabe6847e709963497151af">&#9670;&nbsp;</a></span>logfile_generate_id()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int logfile_generate_id </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Author......: See docs/credits.txt License.....: MIT </p>

<p class="definition">Definition at line <a class="el" href="logfile_8c_source.html#l00013">13</a> of file <a class="el" href="logfile_8c_source.html">logfile.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;{</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;  <span class="keyword">const</span> <span class="keywordtype">int</span> n = rand ();</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;  time_t t;</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;  time (&amp;t);</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;  <span class="keywordflow">return</span> t + n;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;}</div></div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="logfile_8c_source.html#l00035">logfile_generate_subid()</a>, and <a class="el" href="logfile_8c_source.html#l00024">logfile_generate_topid()</a>.</p>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="logfile_8c_accf59abaaeabe6847e709963497151af_icgraph.gif" border="0" usemap="#logfile_8c_accf59abaaeabe6847e709963497151af_icgraph" alt=""/></div>
<map name="logfile_8c_accf59abaaeabe6847e709963497151af_icgraph" id="logfile_8c_accf59abaaeabe6847e709963497151af_icgraph">
<area shape="rect"  title=" " alt="" coords="985,31,1115,57"/>
<area shape="rect"  href="logfile_8c.html#ad43a6618e35a5e81e5801deb6b648d15" title=" " alt="" coords="787,5,937,32"/>
<area shape="rect"  href="logfile_8c.html#a24119994ed9731194ddbf45fccecc8be" title=" " alt="" coords="592,56,739,83"/>
<area shape="rect"  href="hashcat_8c.html#a9ec4f74d423ae0bd4aa6e960632b7086" title=" " alt="" coords="621,5,709,32"/>
<area shape="rect"  href="hashcat_8c.html#ad6cc36d03dcdad3413c794efecb3178a" title=" " alt="" coords="456,5,544,32"/>
<area shape="rect"  href="hashcat_8c.html#ac33e9695b713153c0fc7cce11696704b" title=" " alt="" coords="325,5,408,32"/>
<area shape="rect"  href="hashcat_8c.html#ac49fece3f82732fda9eb29766cc01168" title=" " alt="" coords="104,31,277,57"/>
<area shape="rect"  href="main_8c.html#a3c04138a5bfe5d72780bb7e82a18e627" title=" " alt="" coords="5,31,56,57"/>
</map>
</div>

</div>
</div>
<a id="ad43a6618e35a5e81e5801deb6b648d15"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad43a6618e35a5e81e5801deb6b648d15">&#9670;&nbsp;</a></span>logfile_generate_subid()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void logfile_generate_subid </td>
          <td>(</td>
          <td class="paramtype">hashcat_ctx_t *&#160;</td>
          <td class="paramname"><em>hashcat_ctx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="logfile_8c_source.html#l00035">35</a> of file <a class="el" href="logfile_8c_source.html">logfile.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;{</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;  logfile_ctx_t *logfile_ctx = hashcat_ctx-&gt;logfile_ctx;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;  <span class="keywordflow">if</span> (logfile_ctx-&gt;enabled == <span class="keyword">false</span>) <span class="keywordflow">return</span>;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;  <span class="keyword">const</span> <span class="keywordtype">int</span> <span class="keywordtype">id</span> = <a class="code" href="logfile_8c.html#accf59abaaeabe6847e709963497151af">logfile_generate_id</a> ();</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;  snprintf (logfile_ctx-&gt;subid, 1 + 16, <span class="stringliteral">&quot;SUB%08x&quot;</span>, (u32) <span class="keywordtype">id</span>);</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;}</div><div class="ttc" id="logfile_8c_html_accf59abaaeabe6847e709963497151af"><div class="ttname"><a href="logfile_8c.html#accf59abaaeabe6847e709963497151af">logfile_generate_id</a></div><div class="ttdeci">static int logfile_generate_id(void)</div><div class="ttdef"><b>Definition:</b> <a href="logfile_8c_source.html#l00013">logfile.c:13</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="logfile_8c_source.html#l00013">logfile_generate_id()</a>.</p>

<p class="reference">Referenced by <a class="el" href="hashcat_8c_source.html#l00055">inner2_loop()</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="logfile_8c_ad43a6618e35a5e81e5801deb6b648d15_cgraph.gif" border="0" usemap="#logfile_8c_ad43a6618e35a5e81e5801deb6b648d15_cgraph" alt=""/></div>
<map name="logfile_8c_ad43a6618e35a5e81e5801deb6b648d15_cgraph" id="logfile_8c_ad43a6618e35a5e81e5801deb6b648d15_cgraph">
<area shape="rect"  title=" " alt="" coords="5,5,156,32"/>
<area shape="rect"  href="logfile_8c.html#accf59abaaeabe6847e709963497151af" title=" " alt="" coords="204,5,333,32"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="logfile_8c_ad43a6618e35a5e81e5801deb6b648d15_icgraph.gif" border="0" usemap="#logfile_8c_ad43a6618e35a5e81e5801deb6b648d15_icgraph" alt=""/></div>
<map name="logfile_8c_ad43a6618e35a5e81e5801deb6b648d15_icgraph" id="logfile_8c_ad43a6618e35a5e81e5801deb6b648d15_icgraph">
<area shape="rect"  title=" " alt="" coords="728,5,879,32"/>
<area shape="rect"  href="hashcat_8c.html#a9ec4f74d423ae0bd4aa6e960632b7086" title=" " alt="" coords="592,5,680,32"/>
<area shape="rect"  href="hashcat_8c.html#ad6cc36d03dcdad3413c794efecb3178a" title=" " alt="" coords="456,5,544,32"/>
<area shape="rect"  href="hashcat_8c.html#ac33e9695b713153c0fc7cce11696704b" title=" " alt="" coords="325,5,408,32"/>
<area shape="rect"  href="hashcat_8c.html#ac49fece3f82732fda9eb29766cc01168" title=" " alt="" coords="104,5,277,32"/>
<area shape="rect"  href="main_8c.html#a3c04138a5bfe5d72780bb7e82a18e627" title=" " alt="" coords="5,5,56,32"/>
</map>
</div>

</div>
</div>
<a id="a24119994ed9731194ddbf45fccecc8be"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a24119994ed9731194ddbf45fccecc8be">&#9670;&nbsp;</a></span>logfile_generate_topid()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void logfile_generate_topid </td>
          <td>(</td>
          <td class="paramtype">hashcat_ctx_t *&#160;</td>
          <td class="paramname"><em>hashcat_ctx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="logfile_8c_source.html#l00024">24</a> of file <a class="el" href="logfile_8c_source.html">logfile.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;{</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;  logfile_ctx_t *logfile_ctx = hashcat_ctx-&gt;logfile_ctx;</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;  <span class="keywordflow">if</span> (logfile_ctx-&gt;enabled == <span class="keyword">false</span>) <span class="keywordflow">return</span>;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;  <span class="keyword">const</span> <span class="keywordtype">int</span> <span class="keywordtype">id</span> = <a class="code" href="logfile_8c.html#accf59abaaeabe6847e709963497151af">logfile_generate_id</a> ();</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;  snprintf (logfile_ctx-&gt;topid, 1 + 16, <span class="stringliteral">&quot;TOP%08x&quot;</span>, (u32) <span class="keywordtype">id</span>);</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;}</div><div class="ttc" id="logfile_8c_html_accf59abaaeabe6847e709963497151af"><div class="ttname"><a href="logfile_8c.html#accf59abaaeabe6847e709963497151af">logfile_generate_id</a></div><div class="ttdeci">static int logfile_generate_id(void)</div><div class="ttdef"><b>Definition:</b> <a href="logfile_8c_source.html#l00013">logfile.c:13</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="logfile_8c_source.html#l00013">logfile_generate_id()</a>.</p>

<p class="reference">Referenced by <a class="el" href="hashcat_8c_source.html#l01008">hashcat_session_execute()</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="logfile_8c_a24119994ed9731194ddbf45fccecc8be_cgraph.gif" border="0" usemap="#logfile_8c_a24119994ed9731194ddbf45fccecc8be_cgraph" alt=""/></div>
<map name="logfile_8c_a24119994ed9731194ddbf45fccecc8be_cgraph" id="logfile_8c_a24119994ed9731194ddbf45fccecc8be_cgraph">
<area shape="rect"  title=" " alt="" coords="5,5,152,32"/>
<area shape="rect"  href="logfile_8c.html#accf59abaaeabe6847e709963497151af" title=" " alt="" coords="200,5,329,32"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="logfile_8c_a24119994ed9731194ddbf45fccecc8be_icgraph.gif" border="0" usemap="#logfile_8c_a24119994ed9731194ddbf45fccecc8be_icgraph" alt=""/></div>
<map name="logfile_8c_a24119994ed9731194ddbf45fccecc8be_icgraph" id="logfile_8c_a24119994ed9731194ddbf45fccecc8be_icgraph">
<area shape="rect"  title=" " alt="" coords="325,5,472,32"/>
<area shape="rect"  href="hashcat_8c.html#ac49fece3f82732fda9eb29766cc01168" title=" " alt="" coords="104,5,277,32"/>
<area shape="rect"  href="main_8c.html#a3c04138a5bfe5d72780bb7e82a18e627" title=" " alt="" coords="5,5,56,32"/>
</map>
</div>

</div>
</div>
<a id="a4f19671b53c417b49b3d066631596495"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4f19671b53c417b49b3d066631596495">&#9670;&nbsp;</a></span>logfile_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int logfile_init </td>
          <td>(</td>
          <td class="paramtype">hashcat_ctx_t *&#160;</td>
          <td class="paramname"><em>hashcat_ctx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="logfile_8c_source.html#l00078">78</a> of file <a class="el" href="logfile_8c_source.html">logfile.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;{</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;  folder_config_t *folder_config = hashcat_ctx-&gt;folder_config;</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;  logfile_ctx_t   *logfile_ctx   = hashcat_ctx-&gt;logfile_ctx;</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;  user_options_t  *user_options  = hashcat_ctx-&gt;user_options;</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;  <span class="keywordflow">if</span> (user_options-&gt;logfile_disable == <span class="keyword">true</span>) <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;  logfile_ctx-&gt;logfile = (<span class="keywordtype">char</span> *) <a class="code" href="memory_8c.html#aac788cecd4f6c2a1524456f4a5db7cdc">hcmalloc</a> (HCBUFSIZ_TINY);</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;  snprintf (logfile_ctx-&gt;logfile, HCBUFSIZ_TINY - 1, <span class="stringliteral">&quot;%s/%s.log&quot;</span>, folder_config-&gt;session_dir, user_options-&gt;session);</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;  logfile_ctx-&gt;subid = (<span class="keywordtype">char</span> *) <a class="code" href="memory_8c.html#aac788cecd4f6c2a1524456f4a5db7cdc">hcmalloc</a> (HCBUFSIZ_TINY);</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;  logfile_ctx-&gt;topid = (<span class="keywordtype">char</span> *) <a class="code" href="memory_8c.html#aac788cecd4f6c2a1524456f4a5db7cdc">hcmalloc</a> (HCBUFSIZ_TINY);</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;  logfile_ctx-&gt;enabled = <span class="keyword">true</span>;</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;  FILE *fp = fopen (logfile_ctx-&gt;logfile, <span class="stringliteral">&quot;ab&quot;</span>);</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;  <span class="keywordflow">if</span> (fp == NULL)</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;  {</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    <a class="code" href="event_8c.html#ab419d8d7e9b12e78980ed9f17bdd5ed5">event_log_error</a> (hashcat_ctx, <span class="stringliteral">&quot;%s: %s&quot;</span>, logfile_ctx-&gt;logfile, strerror (errno));</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;  }</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;  fclose (fp);</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;  <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;}</div><div class="ttc" id="event_8c_html_ab419d8d7e9b12e78980ed9f17bdd5ed5"><div class="ttname"><a href="event_8c.html#ab419d8d7e9b12e78980ed9f17bdd5ed5">event_log_error</a></div><div class="ttdeci">size_t event_log_error(hashcat_ctx_t *hashcat_ctx, const char *fmt,...)</div><div class="ttdef"><b>Definition:</b> <a href="event_8c_source.html#l00168">event.c:168</a></div></div>
<div class="ttc" id="memory_8c_html_aac788cecd4f6c2a1524456f4a5db7cdc"><div class="ttname"><a href="memory_8c.html#aac788cecd4f6c2a1524456f4a5db7cdc">hcmalloc</a></div><div class="ttdeci">void * hcmalloc(const size_t sz)</div><div class="ttdef"><b>Definition:</b> <a href="memory_8c_source.html#l00024">memory.c:24</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="event_8c_source.html#l00168">event_log_error()</a>, and <a class="el" href="memory_8c_source.html#l00024">hcmalloc()</a>.</p>

<p class="reference">Referenced by <a class="el" href="hashcat_8c_source.html#l00833">hashcat_session_init()</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="logfile_8c_a4f19671b53c417b49b3d066631596495_cgraph.gif" border="0" usemap="#logfile_8c_a4f19671b53c417b49b3d066631596495_cgraph" alt=""/></div>
<map name="logfile_8c_a4f19671b53c417b49b3d066631596495_cgraph" id="logfile_8c_a4f19671b53c417b49b3d066631596495_cgraph">
<area shape="rect"  title=" " alt="" coords="5,56,84,83"/>
<area shape="rect"  href="event_8c.html#ab419d8d7e9b12e78980ed9f17bdd5ed5" title=" " alt="" coords="132,31,241,57"/>
<area shape="rect"  href="memory_8c.html#aac788cecd4f6c2a1524456f4a5db7cdc" title=" " alt="" coords="149,81,224,108"/>
<area shape="rect"  href="event_8c.html#a6221c6caa1d2069ad1c3103f0b013ef7" title=" " alt="" coords="289,5,368,32"/>
<area shape="rect"  href="event_8c.html#ad5a30ac9dc4301540e19643500eb78e4" title=" " alt="" coords="291,56,367,83"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="logfile_8c_a4f19671b53c417b49b3d066631596495_icgraph.gif" border="0" usemap="#logfile_8c_a4f19671b53c417b49b3d066631596495_icgraph" alt=""/></div>
<map name="logfile_8c_a4f19671b53c417b49b3d066631596495_icgraph" id="logfile_8c_a4f19671b53c417b49b3d066631596495_icgraph">
<area shape="rect"  title=" " alt="" coords="296,5,375,32"/>
<area shape="rect"  href="hashcat_8c.html#a9f3f1b757bdc2a874b4bb0dc657bde1d" title=" " alt="" coords="104,5,248,32"/>
<area shape="rect"  href="main_8c.html#a3c04138a5bfe5d72780bb7e82a18e627" title=" " alt="" coords="5,5,56,32"/>
</map>
</div>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
